package com.jason.bbs.bean.block;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.Min;

import lombok.Data;

@Data
@Entity(name = "block")
@Table(name = "block", indexes = @Index(columnList = "name"))
public class Block {
	@Min(value=0,message="版块编号必须大于等于0")
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;
	
	@Column(nullable = false, unique = true, length = 50)
	private String name;
	@Column(length = 2, nullable = false)
	private Integer status;
	@Column(name = "create_time", nullable = false, columnDefinition = " datetime")
	private Date createTime;
}
